home *** CD-ROM | disk | FTP | other *** search
- // -------------------------------------------------------------------------------------
- // PaletteCell.h
- // -------------------------------------------------------------------------------------
-
- extern "Objective-C" {
- #import <libc.h>
- #import <mach/cthreads.h>
- #import <sys/time.h>
- #import <objc/objc.h>
- #import <objc/zone.h>
- #import <objc/error.h>
- #import <appkit/nextstd.h>
- #import <appkit/graphics.h>
- #import <appkit/Application.h>
- #import <appkit/Font.h>
- #import <appkit/Window.h>
- #import <appkit/color.h>
- #import <appkit/ActionCell.h>
- }
-
- // -------------------------------------------------------------------------------------
-
- @interface PaletteCell : ActionCell
- {
- id imageId; // main image id
- id smallImage; // abbreviated bitmap id
- NXSize imageBounds; // icon image bounding size
- char *imagePath; // path to image
- id titleCell; // title cell
- id delegate; // delegate handler
- mutex_t imageMutex; // image loading mutex
- BOOL dragMode; // matrix dragging mode
- }
-
- // -------------------------------------------------------------------------------------
- + addImageClass:classId;
- + addImageExtensions:(const char*)ext1,...;
- + (BOOL)validExtension:(const char*)fileName;
- - setCellSize:(const NXSize*)cellSize;
- - loadImageFile;
- - setImageFile:(const char *)filePath;
- - image;
- - imageRepresentation:(int)imageNum;
- - (const char*)imagePath;
- - (const char*)cellTitle;
- - calcCellSize:(NXSize *)theSize inRect:(const NXRect *)aRect;
- - drawInside:(const NXRect *)cellFrame inView:controlView;
- - (BOOL)isSelected;
- - setDragMode:(BOOL)flag;
-
- @end
-
- // -------------------------------------------------------------------------------------
- // PaletteCell delegate methods
- @interface PaletteCell(delegate)
- - cellBecameSelected:sender;
- - cellResignedSelected:sender;
- @end
-